<?php
global $di;
$cookies = $di->getShared('cookies');
$searchWord = '';
if ($cookies->has('searchWord')) {
    $searchWord = $cookies->get('searchWord');
}
$newSearchWord = searchWord();
if (!empty($newSearchWord['keyword'])) {
    $searchWord .= $newSearchWord['keyword'];
    $cookies->set('searchWord', $newSearchWord, time() + 2592000);
}
